package org.celery.modules.order.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum OrderStatusShipEnum {
    TO_BE_CONFIRM("待确认", 0),

    TO_BE_SHIP("待发货", 1),

    SHIPPING("配货中", 2),

    TO_BE_RECEIVE("待收货", 3),

    COMPLETED("已完成", 4),

    RETURNED("已退货", 5),
    ;
    private final String name;
    private final int status;

    public static String getName(int status) {
        if (status == TO_BE_CONFIRM.getStatus()) {
            return TO_BE_CONFIRM.getName();
        } else if (status == TO_BE_SHIP.getStatus()) {
            return TO_BE_SHIP.getName();
        } else if (status == SHIPPING.getStatus()) {
            return SHIPPING.getName();
        } else if (status == TO_BE_RECEIVE.getStatus()) {
            return TO_BE_RECEIVE.getName();
        } else if (status == COMPLETED.getStatus()) {
            return COMPLETED.getName();
        } else if (status == RETURNED.getStatus()) {
            return RETURNED.getName();
        } else {
            return "";
        }
    }

}
